package com.lizi.MarkHsiu;

public class VariArgs {

	public static void main(String[] args) {  
        //test();  
        test("aaa");  
        System.out.println();
        test("aaa", 1);  
        System.out.println();
        test("aaa", 1, 2);  
    }  
  
//    public static void test(String... args) {  
//        System.out.println(args.getClass());  
//        for (String arg : args) {  
//            System.out.println(arg);  
//        }  
//    }  
  
    public static void test(String arg, int... args) {  
        System.out.println(arg);  
        
        System.out.println(args.length);
        if(args.length == 1 && args[0] == 1 ){
			System.out.println(args[0] + "  1");
		}
        System.out.println("----------------"); 
        for (int s : args) {  
        	System.out.println(args[0]);
            System.out.println(s);  
        }  
    }  
}
